package heima_bixiangdong;

/**
 * 实现Runnable接口，并实现接口中的线程任务方法，即run()方法。
 */
public class MyRunnable implements Runnable {

    @Override
    public void run() {
        System.out.println("run()方法里面写线程任务代码 " + Thread.currentThread().getName() + "..." + Thread.currentThread().getId());
        for (int i = 1; i <= 10; i++) {
            System.out.println(Thread.currentThread().getName() + "..." + i + "..." + Thread.currentThread().getId());
        }
    }
}
